package com.yang;

import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;

public class HelloThymeleaf {
    public static void main(String[] args) {
        //创建模板引擎
        TemplateEngine templateEngine = new TemplateEngine();
        //准备模板
        String input = "<input type='text' th:value='helloThymeleaf'/>";
        //准备数据
        Context context = new Context();
        //调用引擎，处理模板和数据
        String out = templateEngine.process(input, context);
        System.out.println("结果数据："+out);
    }
}
